<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<link rel="stylesheet" href="/index/css/common.css?v=3">
	<!--<link rel="stylesheet" href="/index/css/zy.media.min.css">-->
	<link rel="stylesheet" href="/index/css/play.css">
	<title>课程播放</title>
	<style>

		body{
			background-color: #E4E4E4;
		}

		.active{
			border:1px solid #0075ff;
			/*color:#fff;*/
		}

	</style>
</head>
<body onmousewheel="return true;">
<div class="tabsBox">
	<div class="tabsBox">
		<div class="topTab">
			<a class="tabLeft" href="{:url('lesson/details',['id'=>$info['lesson_id']])}">
				<img src="/index/assets/left_J.png">
			</a>
			<div class="tabCenters">{$info.section_name}</div>
			<!-- <div class="tabRight">特权说明</div> -->
		</div>
	</div>

	<div class="playvideo">
		<!--<img src="/index/assets/left_J.png" class="turnUp">-->
		<div class="zy_media" style="background: #000;">
			<video poster="{:config('api.oss_img_path').$info.image}" autoplay controlslist="nodownload" style="width:100%;background: #000000" controls  data-config='{"mediaTitle": "{$info.section_name}"}' preload src="{:config('api.oss_img_path')}{$info.url}" >
				<!--<source src="{:config('api.oss_img_path')}{$info.url}" type="video/mp4">-->
				<!--<source src="http://vjs.zencdn.net/v/oceans.webm" type="video/webm">-->
				<!--<source src="http://vjs.zencdn.net/v/oceans.ogv" type="video/ogg">-->
				您的浏览器不支持HTML5视频
			</video>
		</div>
		<!--<div id="modelView">&nbsp;</div>-->
	</div>
	<div class="tuiguang">
		<div class="content">{$info.intro}</div>
		<a class="tgBox" href="{:url('mine/invite')}">
			<img src="/index/assets/money.png" >
			<div class="zhuanqian">推广赚钱</div>
		</a>
	</div>
	<div class="classBox">
		{foreach $section as $k=>$v}
		<a class="className {if $info['id']==$v['id']}active{/if}" href="{:url('section/play',['section_id'=>$v['id']])}" >
			{if !$is_look}
			{if $info['free_section'] < $v['rank']}
			<img src="/index/assets/icon/lock.png" style="float:right">
			{else/}
			<span style="float:right;padding-top:3px;color:#80c342">试看</span>
			{/if}
			{/if}
			<img src="/index/assets/book.png"/>
			<span>{$v.section_name}</span>
		</a>
		{/foreach}
	</div>
</body>
<script type="text/javascript" src="/index/js/jquery-3.4.1.min.js"></script>
<!--<script src="/index/js/zy.media.min.js" type="text/javascript" charset="utf-8"></script>-->
<script>
	$('.turnUp').click(function(){
		window.history.go(-1);
	})

    var u = navigator.userAgent;
    var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端

	if(isiOS){
//	    $('video').attr('controls','true');
	}
//
//	document.body.style.overflow = 'hidden';
//	zymedia('video', {
//		autoplay: false
//	});
//	var screenheight = window.screen.height / 2;
//	$("#modelView").width(window.screen.width);
//	$("video").width(window.width);
//
//	var videoheight = $(".zy_media").height();
//	$(".playvideo").css({
//		"height": videoheight
//	});
//    $("video").css({
//        "height": videoheight
//    });

    //记录学习人数
	var inter = setInterval(function(){

	    if($('.zy_currenttime').text() !='00:00'){
			$.post('{:url("recordPlay")}',{lesson_id:'{$info.lesson_id}'},function(res){
               clearInterval(inter);
            })
		}

	},1000)
</script>
</html>